package com.example.springbootredis.rest;

import com.example.springbootredis.pojo.Product;
import com.example.springbootredis.service.ProductService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @Author: 19239
 * @Description:
 * @Date: 2024/5/10
 * @Version: 1.0
 */
@RestController
@RequestMapping("/product")
public class ProductRest {

    @Autowired
    private ProductService productService;


    @GetMapping("/productId")
    public ResponseEntity<Object> getProduct(int productId) {
        return productService.getProduct(productId);
    }
}
